<template>
  <router-link
    :to="{name: 'freeDetail',
          query: {
            courseId: item.Id,
            title: item.Name,
            courseImg: item.ShowCoverUrl,
            activeVideoId: item.LastStudyChapterId,
            packageId: '',
          }}"
    tag="div"
    class="class-item"
  >
    <div class="class-img-box">
      <img
        v-lazy="item.ShowCoverUrl"
        class="class-cover"
      >
      <!-- <span class="class-people-back">
        10人报名
      </span> -->
    </div>
    <div class="class-item-info-box">
      <div class="class-name">
        {{ item.Name }}
      </div>
      <div
        class="class-teacher"
        style="margin-top: 0.25rem"
      >
        介绍：{{ item.Description }}
      </div>
    </div>
  </router-link>
</template>
<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
  props: {
    item: {
      default: () => ({}),
      type: Object,
    },
  },
})
</script>

<style lang="scss" scoped>
  @import "~scss/class/class.scss";
.class-img-box {
  position: relative;
  width: 250px;
  height: 150px;
  margin-right: 20px;
}
.class-people-back {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 110px;
  height: 32px;
  line-height: 32px;
  font-size: 22px;
  color: #fff;
  text-align: center;
  background:rgba(0,0,0,0.5);
  border-bottom-right-radius: 6px;
  border-top-left-radius: 6px;
}
.class-name {
  padding-top: 8px;
}
.class-teacher {
  // display: inline-block;
  width: 100%;
  color: #333333;
  font-size: 24px;
  padding-top: 35px;
  @include ellipsis;
}
</style>
